<?php

include_once "controller/action/AccountAction.php";

$action = new AccountAction();

if (isset($_GET["add"])) {
	$type = $_GET["type"];

	if ($type == "in" || $type == "out") {
		$action->save();
	} else {

	}
} else if (isset($_GET["remove"])) {
	$action->remove();
} else if (isset($_GET["show"])) {
	$account = $action->show();
	
	include("template/account.php");
} else if (isset($_GET["stats"])) {
	$account = $action->stats();
} else if (isset($_GET["indexByDay"])) {
	$accountList = $action->indexByDay();
} else if (isset($_GET["date"])) {
	$accountList = $action->indexByDate($_GET["date"]);
}

?>